/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mabi.modular.runtime.module.contributions.actions;

import com.mabi.modular.runtime.application.IFrontEndApp;
import com.mabi.modular.runtime.module.contributions.Contribution;

/**
 *
 * @author User
 */
public abstract class AbstractMabiAction implements IMabiAction, Contribution {

    IFrontEndApp frontEndApp = null;

    @Override
    public String getDescription() {
        return null;
    }

    @Override
    public int getPosition() {
        return -1;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }

    @Override
    public boolean isVisible() {
        return true;
    }

    @Override
    public void performAction(Object appContext) {
        getFrontEndApp().getMainWindow().showNotification("Action " + getCaption() + " performed!");
    }

    @Override
    public IFrontEndApp getFrontEndApp() {
        return frontEndApp;
    }

    @Override
    public String[] getCookies() {
        return new String[]{"**"};
    }

    @Override
    public String getModuleName() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
